import java.util.Arrays;
import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        int[] arr = new int[6];
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = scanner.nextInt();
        }
        System.out.println(Arrays.toString(arr));
        int left = 0, right = arr.length - 1; //双指针从首尾开始
        while(left < right){
            int temp = arr[left]; //交换指针元素
            arr[left] = arr[right];
            arr[right] = temp;
            left++;  //指针向中间靠
            right--;
        }
        System.out.println(Arrays.toString(arr));
    }

}
